package com.ruoyi.td.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Map;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class DevicePropertyCache {

    private String name;

    private String unit;
    /**
     * 属性值
     */
    private Object value;

    /**
     * 属性值时间: 设备上报时间
     */
    private Long occurred;



    public Map<String, Object> toMap() {
        return Map.of("value", value, "occurred", occurred);
    }
}
